import {apiGet,apiPost} from '@/utils/request'
import createServer from "@/utils/request.js";
// 随机获取热门问题
export const getQuestionList = (params) => {
    return apiGet( "/message/randomQuestionList",params )
};
// 客服登录验证
export const getGenCTicket = (params) => {
    return apiGet( "/ticket/genTicket",params )
};
// 对gpt的回答进行评论反馈
export const getFeedbackMessage = (params) =>{
    return apiPost( "/feedback/message",params)
};
// 对会话进行评论反馈
export const getFeedbackSession = (params) =>{
    return apiPost( "/feedback/session",params)
};
// 创建客服会话session
export const createSession = (params) =>{
    return apiGet( "/message/createSession",params)
};
// 获取历史消息
export const HistoryMessage = (params) =>{
    return apiGet( "/message/queryHistoryMessage",params)
};
// 微信静默登录
export const wxSilentLogin = (params) =>{
    return apiGet( "/ticket/wxSilentLogin",params)
};
// 获取客服h5页面配置
export const getProjectConfig = (params) =>{
    return apiGet( "/message/getProjectConfig")
};

// 上传图片，返回地址
export const uploadImg = (params) => {
    return createServer({
        url:'/message/uploadImg',
        method:'post',
        data: {...params},
        headers: { "Content-Type": "multipart/form-data" },
    })
};